Web browsers are strongly sandboxed, such that Javascript that is executing in the web browser has very limited access to the operating system or applications that are running on the same operating system. The purpose of the sandbox in a web browser is to provide security for information that is stored locally on the device running the browser.
However, this can also cause problems. For example, if JavaScript that is downloaded into a browser needs to be able to access information that is stored locally, the sandbox prevents this kind of direct access to information. This limits what functionality can be provided for applications that use a browser.